package asphalt2.factory.impl.bind
{
	import asphalt2.factory.impl.CSSBeanFactory;
	import asphalt2.factory.impl.asphalt2container_internal;
	
	use namespace asphalt2container_internal;
	
	public class ScopedBindingBuilder
	{
		private var name:String;
		private var factory:CSSBeanFactory;
		
		public function ScopedBindingBuilder(name:String,factory:CSSBeanFactory){
			this.name = name;
			this.factory = factory;
		}
		
		public function inSingletonScope():void{
			factory.asphalt2container_internal::setBeanDescValue(name,CSSBeanFactory.SCOPE_CONFIG_NAME,CSSBeanFactory.SCOPE_SINGLETON);
		}
		public function inPrototypeScope():void{
			factory.asphalt2container_internal::setBeanDescValue(name,CSSBeanFactory.SCOPE_CONFIG_NAME,CSSBeanFactory.SCOPE_PROTOTYPE);
		}		
	}
}